export const state = () => ({
  posts: []
});

export const mutations = {
  addDraft(state, data) {
    state.posts.unshift(data);
  },
  removeDraft(state, data) {
    state.posts.splice(data, 1);
  }
};
